package com.jxin.mall.core.exception;

import cn.hutool.core.util.StrUtil;

/**
 * ProtoStuff 序列化的异常类
 * @author 蔡佳新
 * @version 1.0
 * @since jdk 1.8
 */
public class ProtoStuffException  extends RuntimeException {
    private static final long serialVersionUID = 4441630576281449651L;
    public ProtoStuffException(Throwable e) {
        super(StrUtil.format("{}: {}", e.getClass().getSimpleName(), e.getMessage()), e);
    }
    public ProtoStuffException(String messageTemplate, Object... params) {
        super(StrUtil.format(messageTemplate, params));
    }
    public ProtoStuffException(Throwable throwable, String messageTemplate, Object... params) {
        super(StrUtil.format(messageTemplate, params), throwable);
    }
}
